import {
  Cascader,
  Checkbox,
  DatePicker,
  Input,
  InputNumber,
  Radio,
  Select,
  Switch,
  Upload,
} from '../../fields';
import { List } from '../fields';
export var Fields = {
  input: Input,
  textarea: Input.Textarea,
  'input-number': InputNumber,
  radio: Radio,
  checkbox: Checkbox,
  select: Select,
  cascader: Cascader,
  'date-picker': DatePicker,
  'range-picker': DatePicker.RangePicker,
  switch: Switch,
  upload: Upload,
  list: List,
};
/**
 * 获取全量的表单控件
 */
export var getFields = function getFields() {
  return Fields;
};
/**
 * 获取表单控件
 * @param type
 */
export var getField = function getField(type) {
  return Fields[type];
};
/**
 * 注册表单控件
 * @param type
 * @param Field
 */
export var registerField = function registerField(type, Field) {
  Fields[type] = Field;
};
/**
 * 撤销表单控件
 * @param type
 * @param Field
 */
export var unregisterField = function unregisterField(type, Field) {
  delete Fields[type];
};
